#include<stdio.h>
#include<string.h>
int main()
{
    char tmp[90];
    int flag = 0;
    int count = 0;
    int i = 1;
    int line = 1;
    while(1)
    {
        gets(tmp);//空格不停，即接受一行字符串
        if(strcmp(tmp,".")==0)
        {
            break;
        }
        char* p = strstr(tmp, "chi1 huo3 guo1");
        if (p != NULL)
        {
            count++;
            if (flag == 0)
            {
                line = i;
                flag++;
            }
        }
        i++;
    }
    if (count == 0)
    {
        printf("%d\n-_-#", i-1);//题目要求最后的'.'的那行不算
    }
    else
    {
        printf("%d\n%d %d", i-1, line, count);
    }
    return 0;
}